class AddTagsAndTagsImages < ActiveRecord::Migration
  def self.up
    create_table "tags" do |t|
      t.column "name", :string, :limit => 30, :default => "", :null => false
    end
  
    create_table "tags_images", :id => false do |t|
      t.column "tag_id", :integer, :default => 0, :null => false
      t.column "book_id", :integer, :default => 0, :null => false
    end
  end

  def self.down
    drop_table :tags
    drop_table :tags_images
  end
end
